package com.atmc.service;

import com.atmc.bean.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Component
@FeignClient(value = "cloud-provider-service")
public interface OpenFeignService {

    @RequestMapping("/articletype-list")
    @ResponseBody
    public List<Bill> select();

    @RequestMapping("/addOnerecord")
    public void addOneRecord(@RequestParam("goods_name") String goods_name, @RequestParam("goods_unit") String goods_unit,
                             @RequestParam("goods_num") Integer goods_num, @RequestParam("total_amount") Integer total_amount,
                             @RequestParam("supplier") String supplier, @RequestParam("payment") String payment
    );

    @RequestMapping("/supplierList")
    @ResponseBody
    public List<Supplier> supplierList();

    @RequestMapping("/userlist")
    @ResponseBody
    public List<User> userList();

    @RequestMapping("/codelist")
    @ResponseBody
    public List<Code> codelist();

    @RequestMapping("/emaillist")
    @ResponseBody
    public List<Email> emaillist();

}
